package demo.DataStrucAndAlgo.Easy_pritice;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/11-10-11-19:54
 * @Description：demo.DataStrucAndAlgo.Easy_pritice
 */
public class BaiduTest3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[][] methods = new String[n][];
        for(int i = 0; i < n; i++){
            String me = sc.nextLine();
            String[] s = me.split(" ");
            methods[i] = new String[s.length-1];
            for (int j = 1; j < s.length-1; j++) {
                methods[i][j-1] = s[j];
                if(j > 1){
                    String[] temp = s[j].split(",");
                    methods[i][j-1] = temp[1];
                }
            }
            if(i == 0){
                System.out.println("Yes");
            }else{
                int j = 0;
                for (j = 0; j < i; j++) {
                    if(Arrays.equals(methods[i],methods[j])){
                        break;
                    }
                }
                if(j >= i){
                    System.out.println("Yes");
                }else{
                    System.out.println("No");
                }
            }
        }

    }
}
